/**门店管理PI**/
import obj from '@/utils/request'
let {request,baseURL} = obj
//查询所有门店
export function getStores(params) {
  return request({
    url: '/stores',
    method: 'get',
    params
  })
}
//添加门店
export function addStores(data) {
  return request({
    url: '/stores',
    method: 'post',
    data
  })
}
//修改门店
export function modStores(data) {
  return request({
    url: '/stores',
    method: 'put',
    data
  })
}
//删除门店
export function delStores(ids) {
  return request({
    url: '/stores',
    method: 'delete',
    data:ids
  })
}
//查看单个门店信息
export function getStoreInfo(id) {
  return request({
    url: '/stores/'+id,
    method: 'get',
  })
}
//查询门店所在的所有国家
export function getStoreCountries() {
  return request({
    url: '/stores/countries',
    method: 'get',
  })
}
//禁用启用门店
export function disableOrEnableStore(stores,params) {
  return request({
    url: '/stores/disableOrEnable',
    method: 'put',
    data:stores,
    params
  })
}
//查询所有门店的id及名字的对应关系
export function getStoreIdNameMap(stores,params) {
  return request({
    url: '/stores/idNameMap',
    method: 'get',
  })
}

